package com.parking.stall.inter;

import com.parking.common.core.model.Result;
import com.parking.stall.client.dto.SelectRentersDTO;
import com.parking.stall.client.dto.SelectRentersInfoByIdDTO;
import com.parking.stall.client.dto.SelectRentersInfoDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * RentersClient:出租客模块服务调用类
 */
@FeignClient(name = "parking-renters",path = "/renters")
public interface RentersClient {
    /**
     * 车位模块调用
     * @param rentersId 出租客账号id
     * selectRentersInfo：调用出租客信息
     * @return SelectRentersInfoDTO：出租客信息返回对象
     */
    @GetMapping("/rentersInfo/selectRentersInfo/{rentersId}")
    public Result<SelectRentersInfoDTO> selectRentersInfo (@PathVariable("rentersId") Integer rentersId)throws Exception;

    /**
     * 车位模块调用
     * rentersInfoCallById：调用出租客信息
     * @param rentersInfoId 出租客信息id
     * @return SelectRentersInfoDTO：出租客信息返回对象
     * @throws Exception
     */
    @GetMapping("/rentersInfo/selectRentersInfo/{rentersInfoId}")
    public Result<SelectRentersInfoByIdDTO> rentersInfoCallById (@PathVariable("rentersInfoId") Integer rentersInfoId)throws Exception;


    /**
     * 车位模块调用
     * @param rentersId 出租客账号id
     * selectRenters：调用出租客账号信息
     * @return SelectRentersDTO：出租客账号返回对象
     */
    @GetMapping("/renters/selectRenters/{rentersId}")
    public Result<SelectRentersDTO> selectRenters (@PathVariable("rentersId") Integer rentersId)throws Exception;

}
